@extends('admin.layout.main')

@section('content')
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
<ul class="breadcrumb">
	<li>
		<i class="ace-icon fa fa-home home-icon"></i>
		<a href="#">币种管理</a>
	</li>
	<li class="active"><a href="{{ url('admin/currency_extract_info') }}">提币记录</a></li>
</ul><!-- /.breadcrumb -->

</div>
<div class="page-content">
	<div class="row">
		<div class="col-xs-12">
            <div class="row">
				<div class="search-area well col-xs-12">
					<form action="">
						<div class="pull-left">
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <b class="text-primary">会员ID: </b>
							&nbsp;
							<div id="toggle-result-format" class="btn-group btn-overlap" data-toggle="buttons">
								<input type="text" name="account"/>
							</div>
							&nbsp;
							<div id="toggle-result-format" class="btn-group btn-overlap" data-toggle="buttons">
								<select class="" name="cid">
                                    <option value='0'>全部</option>
                                    @foreach($currs as $v)
                                        <option value="{{$v->id}}">{{$v->name_en}}</option>
                                    @endforeach
                                </select>
							</div>

							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<button type="submit" class="btn btn-white btn-info btn-bold">查询</button>
						</div>
					</form>
				</div>
			</div>

            <!-- PAGE CONTENT BEGINS -->
			<div class="row">
				<div class="col-xs-12">
					<div class="clearfix">
						<div class="pull-right tableTools-container"></div>
					</div>
					<div class="table-header">

					</div>

					<!-- div.table-responsive -->

					<!-- div.dataTables_borderWrap -->
					<div>
						<table id="dynamic-table" class="table table-striped table-bordered table-hover">
							<thead>
								<tr>
									<th>序号</th>
									<th>用户ID</th>
									<th>用户账号</th>
									<th>提取币种</th>
									<th>用户钱包地址</th>
                                    <th>转出数量</th>
									<th>实际数量</th>
									<th>操作时间</th>
									<th>状态</th>
								</tr>
							</thead>

							<tbody>
							@if(collect($data)->count() > 0)
							@foreach($data as $key=>$val)
								<tr align="center">
									<td align="center">
										<a href="#">{{$key+1}}</a>
									</td>
									<td align="center">{{$val->user->account}}</td>
									<td align="center">{{$val->user->email ? $val->user->email : $val->user->phone}}</td>
									<td align="center">{{$val->currency->name_en}}</td>
									<td  align="center">
										{{$val->wallet_address}}
									</td>
                                    <td align="center">{{$val->num}}</td>
									<td align="center">{{$val->real_num}}</td>
									<td align="center">
										{{$val->created_at}}</td>
									<td  align="center">
										{{\App\Models\Turn::$STATUS[$val->status]}}
									</td>
								</tr>
							@endforeach
							@endif

							</tbody>
						</table>
					</div>
				</div>
			</div>
			<!-- PAGE CONTENT ENDS -->
		</div><!-- /.col -->

		<div class="modal-footer no-margin-top">

			{{ $data->appends(['account'=>$account,'cid'=>$cid])->links() }}
		</div>
	</div><!-- /.row -->
</div><!-- /.page-content -->

@endsection
